<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>条件渲染与循环</title>
		<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
	</head>
	<body>
		<div id="app">
		  <h1 v-if="seen">seen</h1>
		  <h1 v-else="">no seen</h1>
		</div>
		
		<div id="app-4">
		  <ol>
		    <li v-for="todo in todos">
		      {{ todo.text }}
		    </li>
		  </ol>
		</div>
		
		
		<script>
			var app = new Vue({
			  el: '#app',
			  data: {
			    seen:  true
			  }
			})
			
			var app1 = new Vue({
			  el: '#app-4',
			  data: {
			    todos: [
			          { text: '学习 JavaScript' },
			          { text: '学习 Vue' },
			          { text: '整个牛项目' }
			        ]
			  }
			})
		
		</script>
	</body>
</html>